using System;
using System.Collections.Generic;
using System.Text;

namespace BTreeSharp
{
    /// <summary>
    /// Apply this attribute to a property on your POCO object
    /// to specify the field you want store is fixed length. This
    /// works on strings and collections.
    /// USING FIXED LEN PROPERTIES IS FASTER 
    /// </summary>
    [AttributeUsage(AttributeTargets.Property)]
    public class FixedLenAttribute:Attribute
    {
        /// <summary>
        /// Constructs a fixed len attribute.
        /// </summary>
        /// <param name="len">The field length. For string is the number of char, for collection or array the number of element</param>
        public FixedLenAttribute(int len)
        {
            this.len = len;
        }
        private int len;

        public int Length
        {
            get { return len; }
            set { len = value; }
        }
	
    }
}
